<!doctype html>
<html lang="ru" data-bs-theme="dark">

<head>
    <!-- 2024-05-11 14:15:48 -->
        <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>git shell</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" integrity="sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/7.1.0/css/flag-icons.min.css" integrity="sha512-bZBu2H0+FGFz/stDN/L0k8J0G8qVsAL0ht1qg5kTwtAheiXwiRKyCq1frwfbSFSJN3jooR5kauE0YjtPzhZtJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link href="../../../runebook.css" rel="stylesheet" type="text/css">
    <meta name="x-github" content="https://github.com/runebookdev/runebook">
            <meta name="x-i18n-doc" content="git">
        <script>
        function i18n(element) {
            // NOP
        }
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.5/js.cookie.js" integrity="sha512-F/dia2jKME12jwqiYDayeD+Rr/8jTWUD2wfbuJB0bzSwenSEnXsn4qQ/wVyXUCix5bmCAj8xJdtFr2OqUtjLAw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/7.8.1/rxjs.umd.min.js" integrity="sha512-D9LDs8YUUVa4V9Gl4Zb+xqRAc7RCzooR3+zzebgK2RMu/KU+dh90pbjEEMzPiSyRSGbSp9j1pZnrO4joGa5WEg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha512-mhbv5DqBMgrWL+32MmsDOt/OAvqr/cHimk6B8y/bx/xS88MVkYGPiVv2ixKVrkywF2qHplNRUvFsAHUdxZ3Krg==" crossorigin="anonymous"></script>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6424571640879890" crossorigin="anonymous"></script>    <script async src="https://www.googletagmanager.com/gtag/js?id=G-3G5BZ1QEDP"></script>
<script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'G-3G5BZ1QEDP');
</script>    <script>
(function(c, l, a, r, i, t, y) {
    c[a] = c[a] || function() {
        (c[a].q = c[a].q || []).push(arguments)
    };
    t = l.createElement(r);
    t.async = 1;
    t.src = "https://www.clarity.ms/tag/" + i + "?ref=bwt";
    y = l.getElementsByTagName(r)[0];
    y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "jto2hd94r9");
</script>    <script src="../../../theme.js"></script>
</head>

<body>
    <header class="bg-black">
        <div class="container">
            <div class="row">
                <div class="col">
                    <nav class="navbar navbar-expand-lg navbar-dark">
                        <a class="navbar-brand fw-bold" href="https://runebook.dev/ru">
                            <img alt="Runebook.dev" class="d-inline-block align-top mr-1" src="../../../assets/runebook_logo.webp" width="24" height="24">
                            Runebook.dev
                        </a>
                        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="navbarSupportedContent">
                            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/ru#docs">Documentation</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/contributors">Contributors</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://github.com/runebookdev/runebook/issues">GitHub</a>
                                </li>
                            </ul>
                                                                                                <button class="btn btn-success ms-2" id="showPopupButton">
                                        <i class="bi bi-translate"></i>
                                        Show English
                                    </button>
                                                                                        <div class="form-check form-switch ms-3">
                                <label class="text-light">
                                    <input class="form-check-input" type="checkbox" role="switch" id="theme-switch" checked>
                                    <i class="bi bi-moon-stars-fill"></i>
                                </label>
                            </div>
                        </div>
                    </nav>
                </div>
            </div>
        </div>
    </header>

    <!--sse-->
    <div class="container">
    <div class="row">
        <div class="col">
            <nav aria-label="breadcrumb" class="mt-2">
                <ol class="breadcrumb mb-1">
                    <li class="breadcrumb-item">
                        <a href="https://runebook.dev/ru#docs">
                            <span class="fi fi-ru"></span>                            Русский                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <a href="-index-.html">
                            Git                            2.43                        </a>
                    </li>
                                            <li class="breadcrumb-item">
                            <a href="-index-.html#Git">
                                Git                            </a>
                        </li>
                                    </ol>
            </nav>
        </div>
    </div>
    <br>

    <div class="row">
        <div class="col-md-9">
            <main>
                <article>

                    
                    <h1 class="text-body-emphasis" ><span data-i18n="c2e7ff87f03a258ba68bf05e10c51d049e0aaaec90b0993fc3efce471e6b81a2/08" data-source="git-shell" onmousemove="i18n(this)">git-shell</span></h1> <h2 class="text-body-emphasis"  id="_name"><span data-i18n="dcd1d5223f73b3a965c07e3ff5dbee3eedcfedb806686a05b9b3868a2c3d6d50/3a" data-source="Name" onmousemove="i18n(this)">Name</span></h2> <div> <p><span data-i18n="9332b749cddd0095b7a870ebc35a38b30843d65bf5e1cb3f9cb3815c35a8723d/c3" data-source="git-shell - Restricted login shell for Git-only SSH access" onmousemove="i18n(this)">git-shell &mdash; &Ocy;&gcy;&rcy;&acy;&ncy;&icy;&chcy;&iecy;&ncy;&ncy;&acy;&yacy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&acy; &vcy;&khcy;&ocy;&dcy;&acy; &dcy;&lcy;&yacy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&acy; &pcy;&ocy; SSH &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &dcy;&lcy;&yacy; Git.</span></p> </div> <h2 class="text-body-emphasis"  id="_synopsis"><span data-i18n="8eb3755381519d7f0479d75446e56e20084834c0460d7ec94926932372ea6c47/0d" data-source="Synopsis" onmousemove="i18n(this)">Synopsis</span></h2> <div> <div> <pre class="hljs language-ruby">chsh -s <span class="hljs-variable">$(</span>command -v git-shell) &lt;user&gt;
git clone &lt;user&gt;<span class="hljs-variable">@localhost</span><span class="hljs-symbol">:/path/to/repo</span>.git
ssh &lt;user&gt;@localhost</pre> </div> </div> <h2 class="text-body-emphasis"  id="_description"><span data-i18n="526e0087cc3f254d9f86f6c7d8e23d954c4dfda2b312efc29194ae8a860106ba/d3" data-source="Description" onmousemove="i18n(this)">Description</span></h2> <div> <p><span data-i18n="82c217d6caefc1ad52acc85b19fbf2cf791f9599e92803626e6d867aa2a9ae31/39" data-source="This is a login shell for SSH accounts to provide restricted Git access. It permits execution only of server-side Git commands implementing the pull/push functionality, plus custom commands present in a subdirectory named &lt;code&gt;git-shell-commands&lt;/code&gt; in the user&amp;rsquo;s home directory." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&acy; &vcy;&khcy;&ocy;&dcy;&acy; &dcy;&lcy;&yacy; &ucy;&chcy;&iecy;&tcy;&ncy;&ycy;&khcy; &zcy;&acy;&pcy;&icy;&scy;&iecy;&jcy; SSH, &ocy;&bcy;&iecy;&scy;&pcy;&iecy;&chcy;&icy;&vcy;&acy;&yucy;&shchcy;&acy;&yacy; &ocy;&gcy;&rcy;&acy;&ncy;&icy;&chcy;&iecy;&ncy;&ncy;&ycy;&jcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy; &kcy;  Git . &Ocy;&ncy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&acy;&iecy;&tcy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&iecy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &scy;&iecy;&rcy;&vcy;&iecy;&rcy;&ncy;&ycy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;  Git , &rcy;&iecy;&acy;&lcy;&icy;&zcy;&ucy;&yucy;&shchcy;&icy;&khcy; &fcy;&ucy;&ncy;&kcy;&tscy;&icy;&yucy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&yacy; &icy; &ocy;&tcy;&pcy;&rcy;&acy;&vcy;&kcy;&icy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy;&scy;&kcy;&icy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;, &pcy;&rcy;&icy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&icy;&khcy; &vcy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy; &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  <code>git-shell-commands</code>  &vcy; &dcy;&ocy;&mcy;&acy;&shcy;&ncy;&iecy;&mcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&yacy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_commands"><span data-i18n="b269dc4e81a528a4d42e9e74101923514a626f55f8dd76b1461e0690e72d041a/f5" data-source="Commands" onmousemove="i18n(this)">Commands</span></h2> <div> <p><span data-i18n="272bfbed9b128510bd3664a6d4ab660748a36fbf8bfca071a8aba52d99d4edd9/5e" data-source="&lt;code&gt;git shell&lt;/code&gt; accepts the following commands after the &lt;code&gt;-c&lt;/code&gt; option:" onmousemove="i18n(this)"><code>git shell</code>  &pcy;&rcy;&icy;&ncy;&icy;&mcy;&acy;&iecy;&tcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy; &pcy;&ocy;&scy;&lcy;&iecy; &ocy;&pcy;&tscy;&icy;&icy;  <code>-c</code> :</span></p> <div> <dl> <dt id="Documentation/git-shell.txt-emgitreceive-packltargumentgtem"> <span data-i18n="de7f6116f25925c0c4ce7bb2f93d07cecbf07e56eb47a1a04ffaa7f22a67e139/f0" data-source="&lt;em&gt;git receive-pack &amp;lt;argument&amp;gt;&lt;/em&gt;" onmousemove="i18n(this)">git  &pcy;&acy;&kcy;&iecy;&tcy; &pcy;&rcy;&icy;&iecy;&mcy;&acy; &lt;&acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&gt;</span> </dt> <dt id="Documentation/git-shell.txt-emgitupload-packltargumentgtem"> <span data-i18n="14c65e0fa4d88617f088b02481feac11a5eed12d2ad52e9f811d36ddf590de09/09" data-source="&lt;em&gt;git upload-pack &amp;lt;argument&amp;gt;&lt;/em&gt;" onmousemove="i18n(this)">git  &pcy;&acy;&kcy;&iecy;&tcy; &zcy;&acy;&gcy;&rcy;&ucy;&zcy;&kcy;&icy; &lt;&acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&gt;</span> </dt> <dt id="Documentation/git-shell.txt-emgitupload-archiveltargumentgtem"> <span data-i18n="401bcc8849b1566c4455c899af84c79c52d841fa15cacf197f46f73fe45149e3/f2" data-source="&lt;em&gt;git upload-archive &amp;lt;argument&amp;gt;&lt;/em&gt;" onmousemove="i18n(this)">git  &zcy;&acy;&gcy;&rcy;&ucy;&zcy;&kcy;&acy;-&acy;&rcy;&khcy;&icy;&vcy; &lt;&acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&gt;</span> </dt> <dd> <p><span data-i18n="3cc821c35a569ab24b091d6d30bc63635056c053fa62358e37f52e577f657175/15" data-source="Call the corresponding server-side command to support the client&amp;rsquo;s &lt;code&gt;git push&lt;/code&gt;, &lt;code&gt;git fetch&lt;/code&gt;, or &lt;code&gt;git archive --remote&lt;/code&gt; request." onmousemove="i18n(this)">&Vcy;&ycy;&zcy;&ocy;&vcy;&icy;&tcy;&iecy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&ucy;&yucy; &scy;&iecy;&rcy;&vcy;&iecy;&rcy;&ncy;&ucy;&yucy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy; &dcy;&lcy;&yacy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&kcy;&icy; &zcy;&acy;&pcy;&rcy;&ocy;&scy;&acy; &kcy;&lcy;&icy;&iecy;&ncy;&tcy;&acy;  <code>git push</code> ,  <code>git fetch</code>  &icy;&lcy;&icy;  <code>git archive --remote</code> .</span></p> </dd> <dt id="Documentation/git-shell.txt-emcvsserverem"> <span data-i18n="e897a7f1e78850bccad882fee588c7187e216b34c84f0c53ad06fcd739253968/ef" data-source="&lt;em&gt;cvs server&lt;/em&gt;" onmousemove="i18n(this)"><em>cvs server</em></span> </dt> <dd> <p><span data-i18n="c4fa07edb3f0e420ee4ad31600ee0d038ed914159979966b9c41476e90350294/b7" data-source="Imitate a CVS server. See &lt;a href=&quot;git-cvsserver&quot;&gt;git-cvsserver[1]&lt;/a&gt;." onmousemove="i18n(this)">&Icy;&mcy;&icy;&tcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &scy;&iecy;&rcy;&vcy;&iecy;&rcy; CVS. &Scy;&mcy;.  <a href="git-cvsserver.html">git-cvsserver[1]</a> .</span></p> </dd> </dl> </div> <p><span data-i18n="19b5f3fc69471d89d0c1f740bd0e27b039d7b473119847695d53d7b9e3c9d0c7/52" data-source="If a &lt;code&gt;~/git-shell-commands&lt;/code&gt; directory is present, &lt;code&gt;git shell&lt;/code&gt; will also handle other, custom commands by running &amp;quot;&lt;code&gt;git-shell-commands/&amp;lt;command&amp;gt; &amp;lt;arguments&amp;gt;&lt;/code&gt;&amp;quot; from the user&amp;rsquo;s home directory." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  <code>~/git-shell-commands</code>  &pcy;&rcy;&icy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;,  <code>git shell</code>  &tcy;&acy;&kcy;&zhcy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy; &ocy;&bcy;&rcy;&acy;&bcy;&acy;&tcy;&ycy;&vcy;&acy;&tcy;&softcy; &dcy;&rcy;&ucy;&gcy;&icy;&iecy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy;&scy;&kcy;&icy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;, &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&yacy;  &quot;  <code>git-shell-commands/&lt;command&gt; &lt;arguments&gt;</code>  &quot;  &icy;&zcy; &dcy;&ocy;&mcy;&acy;&shcy;&ncy;&iecy;&gcy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&yacy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_interactive_use"><span data-i18n="6f3b0c4bde243a9c0f1b37bce4fbfd390a4dc54d0d689afa43a42041a2ec00be/c3" data-source="Interactive use" onmousemove="i18n(this)">Interactive use</span></h2> <div> <p><span data-i18n="8c1e7a8108bf1fbd8aa905230f204e971423a258aae303806c87fddfb68fe401/23" data-source="By default, the commands above can be executed only with the &lt;code&gt;-c&lt;/code&gt; option; the shell is not interactive." onmousemove="i18n(this)">&Pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &pcy;&rcy;&icy;&vcy;&iecy;&dcy;&iecy;&ncy;&ncy;&ycy;&iecy; &vcy;&ycy;&shcy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy; &mcy;&ocy;&gcy;&ucy;&tcy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&tcy;&softcy;&scy;&yacy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &scy; &ocy;&pcy;&tscy;&icy;&iecy;&jcy;  <code>-c</code> ; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&acy; &ncy;&iecy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &icy;&ncy;&tcy;&iecy;&rcy;&acy;&kcy;&tcy;&icy;&vcy;&ncy;&ocy;&jcy;.</span></p> <p><span data-i18n="1acaf1675af5fd56fa61e5bb527b24148fc571af061e0e3bfc1e236a1eb7bc08/42" data-source="If a &lt;code&gt;~/git-shell-commands&lt;/code&gt; directory is present, &lt;code&gt;git shell&lt;/code&gt; can also be run interactively (with no arguments). If a &lt;code&gt;help&lt;/code&gt; command is present in the &lt;code&gt;git-shell-commands&lt;/code&gt; directory, it is run to provide the user with an overview of allowed actions. Then a &amp;quot;git&amp;gt; &amp;quot; prompt is presented at which one can enter any of the commands from the &lt;code&gt;git-shell-commands&lt;/code&gt; directory, or &lt;code&gt;exit&lt;/code&gt; to close the connection." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  <code>~/git-shell-commands</code>  &pcy;&rcy;&icy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;,  <code>git shell</code>  &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&ncy;&ocy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&tcy;&softcy; &vcy; &icy;&ncy;&tcy;&iecy;&rcy;&acy;&kcy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &rcy;&iecy;&zhcy;&icy;&mcy;&iecy; (&bcy;&iecy;&zcy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&ocy;&vcy;). &IEcy;&scy;&lcy;&icy; &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;  <code>git-shell-commands</code>  &pcy;&rcy;&icy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy;  <code>help</code> , &ocy;&ncy;&acy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&iecy;&tcy;&scy;&yacy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&iecy;&dcy;&ocy;&scy;&tcy;&acy;&vcy;&icy;&tcy;&softcy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&yucy; &ocy;&bcy;&zcy;&ocy;&rcy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&iecy;&ncy;&ncy;&ycy;&khcy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&jcy;. &Zcy;&acy;&tcy;&iecy;&mcy; &ocy;&tcy;&ocy;&bcy;&rcy;&acy;&zhcy;&acy;&iecy;&tcy;&scy;&yacy; &pcy;&rcy;&icy;&gcy;&lcy;&acy;&shcy;&iecy;&ncy;&icy;&iecy;  &quot;git&gt; &quot; , &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&mcy; &mcy;&ocy;&zhcy;&ncy;&ocy; &vcy;&vcy;&iecy;&scy;&tcy;&icy; &lcy;&yucy;&bcy;&ucy;&yucy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy; &icy;&zcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;  <code>git-shell-commands</code>  &icy;&lcy;&icy;  <code>exit</code>  &dcy;&lcy;&yacy; &zcy;&acy;&kcy;&rcy;&ycy;&tcy;&icy;&yacy; &scy;&ocy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&yacy;.</span></p> <p><span data-i18n="dea97c4f0f2d7f752b6a619128158870772b58fe338116e53ac773c99ea04d94/2a" data-source="Generally this mode is used as an administrative interface to allow users to list repositories they have access to, create, delete, or rename repositories, or change repository descriptions and permissions." onmousemove="i18n(this)">&Ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &ecy;&tcy;&ocy;&tcy; &rcy;&iecy;&zhcy;&icy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &acy;&dcy;&mcy;&icy;&ncy;&icy;&scy;&tcy;&rcy;&acy;&tcy;&icy;&vcy;&ncy;&ocy;&gcy;&ocy; &icy;&ncy;&tcy;&iecy;&rcy;&fcy;&iecy;&jcy;&scy;&acy;, &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&yucy;&shchcy;&iecy;&gcy;&ocy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&yacy;&mcy; &scy;&ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&tcy;&softcy; &scy;&pcy;&icy;&scy;&ocy;&kcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy;, &kcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&mcy; &ucy; &ncy;&icy;&khcy; &iecy;&scy;&tcy;&softcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;, &scy;&ocy;&zcy;&dcy;&acy;&vcy;&acy;&tcy;&softcy;, &ucy;&dcy;&acy;&lcy;&yacy;&tcy;&softcy; &icy;&lcy;&icy; &pcy;&iecy;&rcy;&iecy;&icy;&mcy;&iecy;&ncy;&ocy;&vcy;&ycy;&vcy;&acy;&tcy;&softcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&yacy;&tcy;&softcy; &ocy;&pcy;&icy;&scy;&acy;&ncy;&icy;&yacy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy; &icy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&iecy;&ncy;&icy;&yacy;.</span></p> <p><span data-i18n="213d9243040079ae247c841acd1e683e981414127955f538510d211b3b035a65/d8" data-source="If a &lt;code&gt;no-interactive-login&lt;/code&gt; command exists, then it is run and the interactive shell is aborted." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy;  <code>no-interactive-login</code>  &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;, &ocy;&ncy;&acy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&iecy;&tcy;&scy;&yacy; &icy; &icy;&ncy;&tcy;&iecy;&rcy;&acy;&kcy;&tcy;&icy;&vcy;&ncy;&acy;&yacy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&acy; &pcy;&rcy;&iecy;&rcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_examples"><span data-i18n="e68ee04dff59551b7d1ae07a2f8a00dc61d841628948da3d2781630706a05e92/38" data-source="Examples" onmousemove="i18n(this)">Examples</span></h2> <div> <p><span data-i18n="6a59de2c913be775243395890b493e7f80df1e5e887fac8d80b3b5b4966da5a3/d6" data-source="To disable interactive logins, displaying a greeting instead:" onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy; &icy;&ncy;&tcy;&iecy;&rcy;&acy;&kcy;&tcy;&icy;&vcy;&ncy;&ycy;&jcy; &vcy;&khcy;&ocy;&dcy; &vcy; &scy;&icy;&scy;&tcy;&iecy;&mcy;&ucy; &icy; &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &ocy;&tcy;&ocy;&bcy;&rcy;&acy;&zhcy;&acy;&tcy;&softcy; &pcy;&rcy;&icy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&icy;&iecy;:</span></p> <div> <div> <pre class="hljs language-bash">$ chsh -s /usr/bin/git-shell
$ <span class="hljs-built_in">mkdir</span> <span class="hljs-variable">$HOME</span>/git-shell-commands
$ <span class="hljs-built_in">cat</span> &gt;<span class="hljs-variable">$HOME</span>/git-shell-commands/no-interactive-login &lt;&lt;\EOF
<span class="hljs-comment">#!/bin/sh</span>
<span class="hljs-built_in">printf</span> <span class="hljs-string">&apos;%s\n&apos;</span> <span class="hljs-string">&quot;Hi <span class="hljs-variable">$USER</span>! You&apos;ve successfully authenticated, but I do not&quot;</span>
<span class="hljs-built_in">printf</span> <span class="hljs-string">&apos;%s\n&apos;</span> <span class="hljs-string">&quot;provide interactive shell access.&quot;</span>
<span class="hljs-built_in">exit</span> 128
EOF
$ <span class="hljs-built_in">chmod</span> +x <span class="hljs-variable">$HOME</span>/git-shell-commands/no-interactive-login</pre> </div> </div> <p><span data-i18n="acf58a044868d2a3cb4916d815884532107b0d301eeaa1ff8cefab356f14d23a/09" data-source="To enable git-cvsserver access (which should generally have the &lt;code&gt;no-interactive-login&lt;/code&gt; example above as a prerequisite, as creating the git-shell-commands directory allows interactive logins):" onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &vcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy; &kcy; git-cvsserver (&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &dcy;&ocy;&lcy;&zhcy;&iecy;&ncy; &icy;&mcy;&iecy;&tcy;&softcy; &pcy;&rcy;&icy;&vcy;&iecy;&dcy;&iecy;&ncy;&ncy;&ycy;&jcy; &vcy;&ycy;&shcy;&iecy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;  <code>no-interactive-login</code>  &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &pcy;&rcy;&iecy;&dcy;&vcy;&acy;&rcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &ucy;&scy;&lcy;&ocy;&vcy;&icy;&yacy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&iecy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy; git-shell-commands &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &ocy;&scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&lcy;&yacy;&tcy;&softcy; &icy;&ncy;&tcy;&iecy;&rcy;&acy;&kcy;&tcy;&icy;&vcy;&ncy;&ycy;&jcy; &vcy;&khcy;&ocy;&dcy; &vcy; &scy;&icy;&scy;&tcy;&iecy;&mcy;&ucy;):</span></p> <div> <div> <pre class="hljs language-bash">$ <span class="hljs-built_in">cat</span> &gt;<span class="hljs-variable">$HOME</span>/git-shell-commands/cvs &lt;&lt;\EOF
<span class="hljs-keyword">if</span> ! <span class="hljs-built_in">test</span> <span class="hljs-variable">$#</span> = 1 &amp;&amp; <span class="hljs-built_in">test</span> <span class="hljs-string">&quot;<span class="hljs-variable">$1</span>&quot;</span> = <span class="hljs-string">&quot;server&quot;</span>
<span class="hljs-keyword">then</span>
        <span class="hljs-built_in">echo</span> &gt;&amp;2 <span class="hljs-string">&quot;git-cvsserver only handles \&quot;server\&quot;&quot;</span>
        <span class="hljs-built_in">exit</span> 1
<span class="hljs-keyword">fi</span>
<span class="hljs-built_in">exec</span> git cvsserver server
EOF
$ <span class="hljs-built_in">chmod</span> +x <span class="hljs-variable">$HOME</span>/git-shell-commands/cvs</pre> </div> </div> </div> <h2 class="text-body-emphasis"  id="_see_also"><span data-i18n="2fa97693b70fa87b95b2d1bdf9558e4ac65d5e82d145f13a03849c4d9c4957a9/40" data-source="See also" onmousemove="i18n(this)">See also</span></h2> <div> <p><span data-i18n="f8de706826583463f82dea5edb4bedf61a0272b9508ba428354bfa8ac06236aa/fd" data-source="ssh(1), &lt;a href=&quot;git-daemon&quot;&gt;git-daemon[1]&lt;/a&gt;, contrib/git-shell-commands/README" onmousemove="i18n(this)">ssh(1),  <a href="git-daemon.html">git-daemon[1]</a>  , &vcy;&kcy;&lcy;&acy;&dcy;/git-shell-commands/README</span></p> </div><address>
<p>
    &copy; 2012&ndash;2024 Scott Chacon and others<br/>Licensed under the MIT License.<br/>
<a href="https://git-scm.com/docs/git-shell">https://git-scm.com/docs/git-shell</a>
</p>
</address>                </article>
            </main>

            <br>
            <br>
            <hr>

                            <ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-6424571640879890"
     data-ad-slot="3954319254"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>            
        </div>

        <!-- -->

        <div class="col-md-3">
            <br>
            <form action="-index-.html">
                <div class="input-group">
                    <input class="form-control" type="search" name="q" placeholder="Search for Git" required>
                    <button class="btn btn-primary" type="submit">
                        <i class="bi bi-search"></i>
                    </button>
                </div>
            </form>
            <br>

                            <div class="list-group list-group-flush">
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-shortlog.html">
                            git shortlog                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-show.html">
                            git show                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-show-branch.html">
                            git show-branch                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-show-index.html">
                            git show-index                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-show-ref.html">
                            git show-ref                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-sparse-checkout.html">
                            git sparse-checkout                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-stash.html">
                            git stash                        </a>
                                    </div>
            
            <br>
            <div class="my-3">
                   <ins class="adsbygoogle"
        style="display:block; text-align:center;"
        data-ad-layout="in-article"
        data-ad-format="fluid"
        data-ad-client="ca-pub-6424571640879890"
        data-ad-slot="3777011170"></ins>
<script>
    (adsbygoogle = window.adsbygoogle || []).push({});
</script>            </div>
            <br>

            
            
        </div>
    </div>
</div>    <!--/sse-->

    <footer>
        <br>
        <div class="container">
            <div class="row">
                <div class="col">
                    <hr>
                    <div class="row">
                        <div class="col-md-10">
                            <ul class="nav">
                                <li class="nav-item">
                                    <a class="nav-link ps-0" href="https://runebook.dev/">Help us Improve Translation</a>
                                </li>
                                                            </ul>
                        </div>
                        <div class="col-md-2 text-end">
                            <a href="git-shell.html#" class="fs-5" aria-label="Top">
                                <i class="bi bi-arrow-up-square-fill"></i>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <br>
    </footer>
    <script src="../../../runebook.js"></script>
</body>

</html>